package com.jk.controller;

import com.jk.pojo.UserBean;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;
import java.math.BigDecimal;

/**
 * @ClassName RabbitmqController
 * @Descripttion TODO
 * @Author binzi
 * @Date 2022/10/23 16:05
 * @Version 0.001
 */
@RestController
public class RabbitmqController {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    /**
     * @Author: binzi
     * @Description:发送
     * @Date: 2022/10/23 16:58
     * @Return: void
     * @param total_amount
     **/
    @RequestMapping("sendOne")
    public void  sendOne(String total_amount){

        rabbitTemplate.convertAndSend("binzi",total_amount);
        System.out.println("发送成功");
    }

}
